package org.ccay.security.config;

import java.io.Serializable;

/**
 * @author chaowangbang
 *
 */
public class CurrentDimensionConfig {
	
	/**
	 * 维度名称
	 */
	private String dimensionName;
	
	/**
	 * 维度参数名称，过滤器筛选当前维度值通过request.getParameter() request.getHeader() request.getCookies() 用
	 */
	private String dimensionParamName;
	
	/**
	 * 默认的当前值
	 */
	private Serializable defaultCurrentValue;


	public Serializable getDefaultCurrentValue() {
		return defaultCurrentValue;
	}

	public void setDefaultCurrentValue(Serializable defaultCurrentValue) {
		this.defaultCurrentValue = defaultCurrentValue;
	}

	public String getDimensionName() {
		return dimensionName;
	}

	public void setDimensionName(String dimensionName) {
		this.dimensionName = dimensionName;
	}

	public String getDimensionParamName() {
		return dimensionParamName;
	}

	public void setDimensionParamName(String dimensionParamName) {
		this.dimensionParamName = dimensionParamName;
	}


	

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((dimensionName == null) ? 0 : dimensionName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CurrentDimensionConfig other = (CurrentDimensionConfig) obj;
		if (dimensionName == null) {
			if (other.dimensionName != null)
				return false;
		} else if (!dimensionName.equals(other.dimensionName))
			return false;
		return true;
	}

}
